home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 11 Learning / 08 Manslow / CProjectile.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-09-29  |  746 b   |  34 lines

  1. //Tanks
  2. //Copyright John Manslow
  3. //29/09/2001
  4.  
  5. #ifndef _CProjectile_
  6. #define _CProjectile_
  7.  
  8. class CProjectile
  9. {
  10. public:
  11.     CProjectile(
  12.                     const double,            //Initial x position of the projectile
  13.                     const double,            //Initial y position of the projectile
  14.                     const double,            //Initial x component of its velocity
  15.                     const double            //Initial y component of its velocity
  16.                     );
  17.  
  18.     ~CProjectile();
  19.  
  20.         //Called once per time step to update the projectile's velocity and location
  21.     void TimeStep(const double);
  22.  
  23.         //The projectile's current position
  24.     double dxPosition,dyPosition;
  25.  
  26.         //Its current velocity
  27.     double dSpeedx,dSpeedy;
  28.  
  29.         //Its previous position
  30.     double dPreviousxPosition,dPreviousyPosition;
  31.  
  32. };
  33.  
  34. #endif